import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import { connect } from 'umi'
import { Page } from 'components'
import { Avatar, Descriptions } from 'antd'
import { t } from "@lingui/macro"
import {getNavigationTreeTitle} from "utils/tree";

@connect(({ adminJobLogDetail }) => ({ adminJobLogDetail }))
class AdminJobLogDetail extends PureComponent {
  render() {
    const { adminJobLogDetail } = this.props
    const { data,options,trees } = adminJobLogDetail
    return (
      <Page inner>
        {/*<div className={styles.content}>{content}</div>*/}
        <Descriptions title={t`计划任务执行日志`}>
          {/*{content}*/}
          <Descriptions.Item label={t`Id`}>{data.id}</Descriptions.Item>
          <Descriptions.Item label={t`Job Id`}>{data.jobId}</Descriptions.Item>
          <Descriptions.Item label={t`Start Time`}>{data.startTime}</Descriptions.Item>
          <Descriptions.Item label={t`Status`}>{options.status[data.status]}</Descriptions.Item>
          <Descriptions.Item label={t`Result`}>{data.result}</Descriptions.Item>
          <Descriptions.Item label={t`End Time`}>{data.endTime}</Descriptions.Item>
          <Descriptions.Item label={t`Admin Id`}>{data.adminId}</Descriptions.Item>
        </Descriptions>
      </Page>
    )
  }
}

AdminJobLogDetail.propTypes = {
  adminJobLogDetail: PropTypes.object,
}

export default AdminJobLogDetail
